package com.sghd.pojo.fight.game;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * @author frank
 * @date 2018-10-18 16:49
 * @desc
 **/
public class ChessVo {

    private int state;

    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    private ChessType type;

    public ChessVo() {
    }

    public ChessVo(ChessType type) {
        this.type = type;
    }

    public ChessVo(int state, ChessType type) {
        this.state = state;
        this.type = type;
    }

    public static ChessVo valueOf(int state, ChessType type) {
        ChessVo chessVo = new ChessVo();
        chessVo.state = state;
        chessVo.type = type;
        return chessVo;
    }

    public ChessType getType() {
        return type;
    }

    public void setType(ChessType type) {
        this.type = type;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return type.toString();
    }
}
